import { createApp } from 'vue'
import ElementPlus from 'element-plus' // element-plus
import 'element-plus/dist/index.css'
import App from './App.vue'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs' // 国际化
import components from '@/components/index' // 引入需要注册的全部组件
import * as icons from '@element-plus/icons-vue' // 引入全部图标
import RfAmapAddress from 'ls-amap-address'
import RfFileUpload from 'ls-file-upload'
import '@/styles/style.scss'
const app = createApp(App)
// 加载 element-plus
app
  .use(ElementPlus, {
    locale: zhCn, // 将中文设置为默认语言
    size: 'default' // 加载默认尺寸
  })
  .use(components)
  .use(RfFileUpload)
  .use(RfAmapAddress)

Object.keys(icons).forEach((key) => {
  app.component(key, icons[key])
})
app.mount('#app')
